package com.ruoyi.business.service;

import com.ruoyi.business.vo.AuditInfo;
import org.activiti.engine.history.HistoricTaskInstance;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;

import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

/**
 * Description：
 *
 * @author Gekor
 * @date Create on 2021/7/21 14:08
 */
public interface IProcessService {
	Deployment deploy(String filepath) throws FileNotFoundException;

	ProcessDefinition selectProcessDefinitonByDeployId(String deploymentId);

	InputStream getImgInputStream(String definitionId, List<String> highLightedActivities, List<String> highLightedFlows);

	ProcessInstance startProcessInstance(String definitionKey, String businessKey, Map<String, Object> variables);

	Task getExecutingTask(String processInstanceId);

	String getComment(String taskId);

	void addCandidateUser(String taskId, Long userId);

	List<AuditInfo> selectHistoricAudit(String instanceId);

	String selectTaskDefinitionKeyByTaskId(String taskId);

	String selectProcessDefinitonIdByInstanceId(String instanceId);

	void deleteProcessInstance(String instanceId);

	List<String> selectProcessInstanceWithLoginUser();

	Task completeTaskByAudit(String taskId, boolean auditStatus, String comment, String id);

	ProcessInstance selectProcessInstanceByTaskId(String taskId);

	void addAssignee(String taskId, String createBy);

	void completeTaskByApplicant(String taskId);

	List<HistoricTaskInstance> selectDoneTaskList(Long userId);

	Task selectExcutingTaskByProcessInstanceId(String processInstanceId);
}
